home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / Install / program files / Borland / BDS / 3.0 / Objrepos / SiteModules.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2004-10-22  |  1.7 KB  |  94 lines

  1. [!outputoff]
  2. [!if=(Filecomments, "True")]
  3. * stWebModuleSource
  4. * 0 - FModuleIdent
  5. * 1 - FFormIdent
  6. * 2 - FAncestorIdent
  7. * 3 - Uses
  8. * 4 - Factory
  9. * 5 - Components
  10. * 6 - HTML comment
  11. [!endif]
  12. [!outputon]
  13. [!if=(WebModuleSource, "True")]
  14. unit %0:s;
  15.  
  16. interface
  17.  
  18. uses
  19.   SysUtils, Classes, HTTPApp, WebModu%3:s;
  20.  
  21. type
  22.   T%1:s = class(T%2:s)%5:s
  23.   private
  24.     { Private declarations }
  25.   public
  26.     { Public declarations }
  27.   end;
  28.  
  29.   function %1:s: T%1:s;
  30.  
  31. implementation
  32.  
  33. [!if=(Clx, "TRUE")]
  34. {$R *.xfm} %6:s
  35. [!else]
  36. {$R *.dfm} %6:s
  37. [!endif]
  38.  
  39. uses WebReq, WebCntxt, WebFact, Variants;
  40.  
  41. function %1:s: T%1:s;
  42. begin
  43.   Result := T%1:s(WebContext.FindModuleClass(T%1:s));
  44. end;
  45.  
  46. initialization
  47.   if WebRequestHandler <> nil then
  48.     WebRequestHandler.AddWebModuleFactory(%4:s);
  49.  
  50. end.
  51. [!endif]
  52. [!if=(WebModuleIntf, "True")]
  53. * stWebModuleIntf
  54. [!endif]
  55. [!if=(WebAppPageModuleFactory, "True")]
  56. [!outputoff]
  57. * stWebAppPageModuleFactory
  58. * 0 - Form
  59. * 1 - CreateMode (ignored)
  60. * 2 - CacheMode
  61. * 3 - PageInfo
  62. [!outputon]
  63. TWebAppPageModuleFactory.Create(T%0:s, TWebPageInfo.Create(%3:s), %2:s)
  64. [!endif]
  65. [!if=(WebAppDataModuleFactory, "True")] 
  66. [!outputoff]
  67. * stWebAppDataModuleFactory
  68. * 0 - Form
  69. * 1 - CreateMode (ignored)
  70. * 2 - CacheMode
  71. [!outputon]
  72. TWebAppDataModuleFactory.Create(T%0:s, %2:s)
  73. [!endif]
  74. [!if=(WebPageModuleFactory, "True")]
  75. [!outputoff]
  76. * stWebPageModuleFactory
  77. * 0 - Form
  78. * 1 - CreateMode
  79. * 2 - CacheMode
  80. * 3 - PageInfo
  81. [!outputon]
  82. TWebPageModuleFactory.Create(T%0:s, TWebPageInfo.Create(%3:s), %1:s, %2:s)
  83. [!endif]
  84. [!if=(WebDataModuleFactory, "True")]
  85. [!outputoff]
  86. * stWebDataModuleFactory
  87. * 0 - Form
  88. * 1 - CreateMode
  89. * 2 - CacheMode
  90. [!outputon]
  91. TWebDataModuleFactory.Create(T%0:s, %1:s, %2:s)
  92. [!endif]
  93.  
  94.